﻿namespace factory
{
    class Program
    {
        static void Main(string[] args)  // 工厂, 用于产生正多边型
        {
            ShapeFactory shapeFactory = new ShapeFactory();
            Shape shape3 = shapeFactory.construct(3, 10);
            shape3.sayType();
            Console.WriteLine(shape3.getArea());
            Shape shape5 = shapeFactory.construct(5, 100);
            shape5.sayType();
            Console.WriteLine(shape5.getArea());
            Shape shape1 = shapeFactory.construct(1, 10);
        }
    }
}